
public class Counter {
	public int wichAreaBigger(Figures first, Figures second, Figures third)
	{
		double firstArea = first.area();
		double secondArea = second.area();
		double thirdArea = third.area();
		if ((firstArea > secondArea)&&(firstArea > thirdArea))
		{
			return 1;
		}
		else
		{
			if (secondArea > thirdArea)
			{
				return 2;
			}
			else
			{
				return 3;
			}
		}
	}
	public Circle returnCircle(Figures figure)
	{
		figure.setWeightCenter();
		double x = figure.getWeightCenterX();
		double y = figure.getWeightCenterY();
		double area = figure.area();
		double radius = Math.sqrt(area/3.14);
		Circle circle = new Circle(x,y,radius);
		return circle;
		
	}

}
